<?php
namespace app\api\model;

use think\Db;
use think\Model;

class PictureModel extends Model
{
      function picturelist() {
        $masters =  Db::name('picture')->select();
        return $masters;
	    }
	    function picturedetail($pictureid) {
        $result = Db::name('picture')->where('pictureid',$pictureid)->find();
        return $result;
    }
    function reply($userid, $pictureid, $content) {
        $data = ['userid'=>$userid, 'pictureid' => $pictureid, 'content' => $content];
        $result = Db::name('reply')->insertGetId($data);
        return ['replyid'=>$result];
    }
}